From: Keir Fraser Date: Fri, 23 Apr 2010 07:38:35 +0000 (+0100) Subject: cpupools: optimise domain creation if pool movement is a no-op X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~12315 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=bb315e238429926ad570185fbdcad8ace008a791;p=xen.git cpupools: optimise domain creation if pool movement is a no-op Signed-off by: Juergen Gross --- diff --git a/xen/common/cpupool.c b/xen/common/cpupool.c index 7e32296061..6baedd0e14 100644 --- a/xen/common/cpupool.c +++ b/xen/common/cpupool.c @@ -520,6 +520,12 @@ addcpu_out: rcu_unlock_domain(d); break; } + if ( op->cpupool_id == d->cpupool->cpupool_id ) + { + ret = 0; + rcu_unlock_domain(d); + break; + } printk(XENLOG_DEBUG "cpupool move_domain(dom=%d)->pool=%d\n", d->domain_id, op->cpupool_id); ret = -ENOENT;